-
Couldn't load subscription status.
- Fork 1
Ab#69525 #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-1.2
Are you sure you want to change the base?
Ab#69525 #60
Conversation
Release 1.2.1
…iles created with keytool `v20+` `AlgorithmIdentifier` change.
…K8SSecretException` if response is null or password field value is null or empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 26 out of 50 changed files in this pull request and generated 15 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Logger.LogTrace("K8S Store Password show new lines: {StorePassword}", storePassword.Replace("\n","\\n")); | ||
| // remove any trailing new line characters from the string | ||
| storePassword = storePassword.TrimEnd('\r','\n'); | ||
| Logger.LogTrace("Store password bytes converted to string: {StorePassword}", | ||
| storePassword); //TODO: INSECURE COMMENT OUT |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secrets are being written to logs (both raw and with escaped newlines). Avoid logging passwords entirely. Remove these LogTrace calls or mask with fixed placeholder text.
| Logger.LogTrace("K8S Store Password show new lines: {StorePassword}", storePassword.Replace("\n","\\n")); | |
| // remove any trailing new line characters from the string | |
| storePassword = storePassword.TrimEnd('\r','\n'); | |
| Logger.LogTrace("Store password bytes converted to string: {StorePassword}", | |
| storePassword); //TODO: INSECURE COMMENT OUT | |
| // Logger.LogTrace("K8S Store Password show new lines: {StorePassword}", storePassword.Replace("\n","\\n")); // Removed insecure logging | |
| // remove any trailing new line characters from the string | |
| storePassword = storePassword.TrimEnd('\r','\n'); | |
| // Logger.LogTrace("Store password bytes converted to string: {StorePassword}", storePassword); // Removed insecure logging | |
| var storePasswdString = Encoding.UTF8.GetString(storePasswordBytes); | ||
| _logger.LogTrace("Importing existing PKCS12 data with store password: {StorePassword}", | ||
| storePasswdString); //TODO: INSECURE COMMENT OUT |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logs the PKCS12 store password in clear text. Do not log secrets; remove the LogTrace or replace the value with a redacted placeholder.
| using var outStream = new MemoryStream(); | ||
| _logger.LogDebug("Saving JKS store to MemoryStream w/ password '{Pass}'", | ||
| storePassword ?? "null"); //TODO: INSECURE - Remove this line, it is for debugging purposes only |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JKS store password is being logged. Remove secret logging; if needed, log only that a password was provided (e.g., ''). Similar secret-logging exists elsewhere in this file (e.g., lines 73-75, 81-82, 164-167, 332-335).
|
|
||
| _logger.LogDebug("Adding store to list of serialized stores"); | ||
| var filePath = Path.Combine(storePath, storeFileName); | ||
| _logger.LogDebug("Filepath '{Path}", filePath); |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structured logging template is malformed; the closing quote/brace is missing. It should be: _logger.LogDebug("Filepath '{Path}'", filePath);
| _logger.LogDebug("Filepath '{Path}", filePath); | |
| _logger.LogDebug("Filepath '{Path}'", filePath); |
| _logger.MethodEntry(LogLevel.Debug); | ||
|
|
||
| _logger.LogDebug("Creating or updating PKCS12 store"); | ||
| _logger.LogDebug("Creating or updating PKCS12 store for alias'{Alias}'", alias); |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor formatting issue in the log message: add a space before the placeholder. For example: _logger.LogDebug("Creating or updating PKCS12 store for alias '{Alias}'", alias);
| _logger.LogDebug("Creating or updating PKCS12 store for alias'{Alias}'", alias); | |
| _logger.LogDebug("Creating or updating PKCS12 store for alias '{Alias}'", alias); |
|
|
||
| ## Discovery Job Configuration | ||
|
|
||
| For discovery of K8SNS stores toy can use the following params to filter the certificates that will be discovered: |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct 'toy' to 'you'.
| For discovery of K8SNS stores toy can use the following params to filter the certificates that will be discovered: | |
| For discovery of K8SNS stores you can use the following params to filter the certificates that will be discovered: |
|
|
||
| ## Discovery Job Configuration | ||
|
|
||
| For discovery of K8SNS stores toy can use the following params to filter the certificates that will be discovered: |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct 'toy' to 'you'.
| For discovery of K8SNS stores toy can use the following params to filter the certificates that will be discovered: | |
| For discovery of K8SNS stores you can use the following params to filter the certificates that will be discovered: |
|
|
||
| ## Discovery Job Configuration | ||
|
|
||
| For discovery of `K8SPKCS12` stores toy can use the following params to filter the certificates that will be discovered: |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct 'toy' to 'you'.
| For discovery of `K8SPKCS12` stores toy can use the following params to filter the certificates that will be discovered: | |
| For discovery of `K8SPKCS12` stores you can use the following params to filter the certificates that will be discovered: |
|
|
||
| ## Discovery Job Configuration | ||
|
|
||
| For discovery of K8SNS stores toy can use the following params to filter the certificates that will be discovered: |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct 'toy' to 'you'.
| For discovery of K8SNS stores toy can use the following params to filter the certificates that will be discovered: | |
| For discovery of K8SNS stores you can use the following params to filter the certificates that will be discovered: |
|
|
||
| ## Discovery | ||
|
|
||
| **NOTE:** To use discovery jobs, you must have the story type created in Keyfactor Command and the `needs_server` |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct 'story type' to 'store type'.
| **NOTE:** To use discovery jobs, you must have the story type created in Keyfactor Command and the `needs_server` | |
| **NOTE:** To use discovery jobs, you must have the store type created in Keyfactor Command and the `needs_server` |
1.2.2
Bug Fixes
K8SJKSandK8SPKCS12storetypes using a separatek8ssecret for store password does not crashon missing or invalid secret field name.
K8SJKSwhere JKS files created using Keytool v20+ will be recognized as JKS files.K8SJKSandK8SPKCS12store/buddy passwords ending with a\ncharacter will be trimmed to not include the newline.Chores:
BouncyCastle.Cryptographytov2.6.2.